<template>
	<view class="">
		<view class="flex-content flex-wrap conter_arr">
			<view class="flex-content" style="width: 100%;">
				<image class="tab-imgs" :src="detailInfo.image" mode=""></image>
			</view>
			<view class="title" style="width: 100%;">{{detailInfo.title}}</view>
			<view class="flex-line-height money-box">
				<view class="flex money" v-if="detailInfo.money!='0.00'">
					<text class="fuho">¥</text>
					{{detailInfo.money}}
				</view>
				<view class="flex money" v-else>
					
				</view>
				<!-- <view class="normal">
					{{detailInfo.member_money}}
				</view> -->
			</view>
		</view>
		<view class="flex-content flex-line-height" style="padding-top: 16rpx;">
			<!-- <view class="flex flex-line-height">
				<view style="width: 30rpx;" v-for="i in 4">
					<image class="userimg"  :src="imgUrl+'/logo.png'" mode=""></image>
				</view>
			</view> -->
			<view class="shznsInfo" style="padding-left: 0;">
				{{detailInfo.fake_sales}}人已练习
			</view>
		</view>
		<view class=" borde-padd-24">
			<view class="conbenetArr flex-height-between">
				<view class="user-kechen">
					<view class="num">{{detailInfo.txamination_time}}分钟</view>
					<view class="title">建议用时</view>
				</view>
				<view class="user-kechen">
					<view class="num">{{detailInfo.item_number}}</view>
					<view class="title">题目数量</view>
				</view>
				<view class="user-kechen">
					<view class="num ">
						<!-- -->
						<view class="flex">
							<view v-for="(item,index) in 5">
								<image class="im" v-if="detailInfo.difficulty>=item" :src="imgUrl+'/xingact.png'" mode=""></image>
								<image class="im" v-else  :src="imgUrl+'/xing.png'" mode=""></image>
							</view>
						</view>
					</view>
					<view class="title">试题难度</view>
				</view>
			</view>
			<view class="title-tiku">
				题库介绍
			</view>
		</view>
		<view class="footerlianx">
			<!-- @click="goPages(`/record/practice/index?id=${detailInfo.id}&tid=${detailInfo.tid}`)" -->
			<view class="butom" @click="start" >
				开始练习
			</view>
		</view>
		
	</view>
</template>

<script>
	import {
		Request
	} from '@/utils/request.js'
	export default{
		data(){
			return {
				idUes:'',
				imgUrl:this.imgUrl,
				detailInfo:{},
			}
		},
		onLoad({id}) {
			this.idUes=id;
			this.questionsdetail();
		},
		methods:{
			goPages(path){
				uni.navigateTo({
					url:path
				})
			},
			start(){
		
					Request('questions/userstartAnswer',{
						test_id:this.detailInfo.id
					}).then((res)=>{
						console.log(res)
						if(res.code==300){
											
						}else{
							this.exam_id = res.examination_id;
							uni.navigateTo({
								url:`/record/practice/index?examination_id=${this.exam_id}&id=${this.detailInfo.id}&tid=${this.detailInfo.tid}`
							})						
						}
					})
			},
			questionsdetail(){
				Request('questions/detail',{
					id:this.idUes
				}).then((data)=>{
					this.detailInfo=data;
				})
			}
		}
	}
</script>

<style scoped>
	.tab-imgs{
		width: 200rpx;
		height: 200rpx;
		margin: 32rpx auto;
	}
	.conter_arr{
		text-align: center;
	}
	.conter_arr .title{
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 40rpx;
		color: #0D0E0F;
		text-align: center;
		font-style: normal;
		text-transform: none;
	}
	.money-box .normal{
		font-family: MiSans, MiSans;
		font-weight: 400;
		font-size: 24rpx;
		color: #8F9294;
		margin-left: 16rpx;
		margin-top: 8rpx;
		font-style: normal;
		text-decoration-line: line-through;
		text-transform: none;
	}
	.money-box .money{
		font-family: MiSans, MiSans;
		font-weight: 600;
		font-size: 36rpx;
		color: #E26262;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}
	.money-box .fuho{
		font-family: MiSans, MiSans;
		font-weight: 500;
		font-size: 24rpx;
		color: #E26262;
		text-align: left;
		font-style: normal;
		margin-right:5rpx;
		margin-top: 12rpx;
		text-transform: none;
	}
	.userimg{
		width: 34rpx;
		height: 34rpx;
		border-radius: 50%;
	}
	
	.shznsInfo{
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 24rpx;
		color: #8F9294;
		padding-left: 50rpx;
		text-align: center;
		font-style: normal;
		text-transform: none;
	}
	.conbenetArr{
		width: 682rpx;
		height: 123rpx;
		background: #F7F8FA;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin-top: 16rpx;
	}
	.conbenetArr .user-kechen{
		flex: 1;
		text-align: center;
	}
	.conbenetArr .user-kechen .num{
		display: flex;
		justify-content: center;
	}
	.conbenetArr .user-kechen .num .im{
		width: 28rpx;
		height: 28rpx;
	}
	.conbenetArr .num{
		font-family: MiSans, MiSans;
		font-weight: 600;
		font-size: 28rpx;
		color: #0D0E0F;
		text-align: center;
		font-style: normal;
		text-transform: none;
	}
	.conbenetArr .title{
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 22rpx;
		color: #8F9294;
		text-align: center;
		font-style: normal;
		text-transform: none;
	}
	.title-tiku{
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		padding-top: 24rpx;
		padding-bottom: 16rpx;
		color: #0D0E0F;
		font-style: normal;
		text-transform: none;
	}
</style>